package com.tsd.jxc.utils;

import com.tsd.core.utils.HlpUtils;
import com.tsd.jxc.vo.JxcSettingVo;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @ClassName: ClothingUtil
 * @Description: TODO
 * @Author: Hillpool
 * @Date: 2023/3/14 17:23
 * @Version: 1.0
 */
public class ClothingUtil {

    public static List<String> getClothing_preset_size_group_list(JxcSettingVo settingVo) {
        List<String> sizeList = new ArrayList<>();
        if (!HlpUtils.isEmpty(settingVo.getClothing_preset_size())) {
            String[] strings = settingVo.getClothing_preset_size().replaceAll("；", ";").split(";");
            sizeList = Arrays.asList(strings);
        }
        return sizeList;
    }

    public static List<String> getClothing_preset_size_list(JxcSettingVo settingVo) {
        List<String> sizeList = new ArrayList<>();
        if (!HlpUtils.isEmpty(settingVo.getClothing_preset_size())) {
            String[] strings = settingVo.getClothing_preset_size().replaceAll(";", ",")
                    .replaceAll("；", ",").replaceAll("，", ",").split(",");
            sizeList = Arrays.asList(strings);
        }
        return sizeList;
    }
}
